package com.object.oriented.exam.system1.entity;

import lombok.Data;

/**
 * @author : Apple
 * @description :
 * @date : 2023-06-14 09:08
 **/
@Data
public class Result {

    private Integer code;

    private String message;

    private Boolean success;

    private Object data;

    public static Result success() {
        Result result = new Result();
        result.setCode(200);
        result.setSuccess(true);
        result.setMessage("Success!");
        return result;
    }

    public static Result success(Object data) {
        Result result = new Result();
        result.setCode(200);
        result.setSuccess(true);
        result.setMessage("Success!");
        result.setData(data);
        return result;
    }


}
